package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.query.OperationUserLogQuery;
import com.novax.ex.activity.open.model.request.OperationUserLogRequest;
import com.novax.ex.activity.open.model.response.OperationUserLogOuterResponse;
import com.novax.ex.activity.open.model.response.OperationUserLogResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import jakarta.validation.Valid;
import java.util.List;

/**
 * @Description
 * @Author ChenXi
 * @Date 2023/04/18/10:48
 */

@Tag(name = "后台-活动参与日志", description = "后台-活动参与日志")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "OperationUserLogInnerApi", contextId = "OperationUserLogInnerApi")
public interface OperationUserLogInnerApi {


    @Operation(summary = "分页查询")
    @GetMapping("/v3/private/operation/user/log")
    ReturnResult<PageUtil<OperationUserLogResponse>> page(@RequestHeader("language") String language,
                                                          @ParameterObject OperationUserLogQuery query);

    @Operation(summary = "查询所有参与日志")
    @GetMapping("/v3/private/operation/user/log/query")
    ReturnResult<List<OperationUserLogOuterResponse>> queryList(@RequestHeader("language") String language,
                                                           @ParameterObject OperationUserLogQuery query);


    @Operation(summary = "新增")
    @PostMapping("/v3/private/operation/user/log/add")
    ReturnResult<?> add(@RequestHeader("language") String language,
                        @RequestHeader("ip") String ip,
                        @Valid @RequestBody OperationUserLogRequest operationUserLogRequest,
                        BindingResult bindingResult);

}
